<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<title>增加文章</title>
<link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
<link rel="stylesheet" href="../static/web/css/admin.css">
<link rel="stylesheet" href="../static/web/css/daterangepicker.css">
<link rel="stylesheet" href="../static/web/css/jquery.fileupload.css">
<link rel="stylesheet" href="../static/web/css/cropper.min.css">
<script>const cfg_uplitpic_cut = '<?php echo $cfg_uplitpic_cut; ?>';</script>
<script src="../static/web/js/jquery.min.js"></script>
<script src="../static/web/js/webajax.js"></script>
<script src="../static/web/js/moment.min.js"></script>
<script src="../static/web/js/daterangepicker.js"></script>
<script src="js/main.js"></script>
<script src="js/handlers.js"></script>
<script src="../static/web/js/bootstrap.bundle.min.js"></script>
<script src="../static/web/js/cropper.min.js"></script>
<script>
var arctype = 'article';
function checkSubmit() {
if (document.form1.title.value == '') {
ShowMsg('文章标题不能为空');
return false;
}
if (document.form1.typeid.value == 0) {
ShowMsg('请选择档案的主类别');
return false;
}
}
</script>
<style>
body{background:#fff}
img{vertical-align:baseline}
table{border-collapse:separate}
.btn-group-sm>.btn,.btn-sm{padding:0 5px;line-height:32px;}
#title{background:#fff;}
.multipic{border: 1px dashed #FC6;}
.albCt {border-bottom: 1px dashed #FC0;margin-bottom: 10px;padding-bottom:10px;}
.albCt img{cursor:pointer;}
#le_vod1,#le_vod2{width:100% !important;height:44px !important;padding:10px;line-height:22px;}
.bline{border-bottom:0;padding:0 0 10px;}
input[type="text"]{padding:0 10px;height:34px;line-height:34px;}
textarea{box-sizing:border-box;}
input[type="button"],input[type="submit"],input[type="reset"]{padding:6px;padding-right:5px;padding-left:5px;line-height:20px;border:1px solid #51acf9;}
.yxw-wz-xiugai li u{font-size:14px;color:#fff;text-decoration:none;}
.yxw-wz-xiugai li a{background:#28a745;padding:0 15px;line-height:32px;display:inline-block;border-radius:3px;color:#fff;transition: all .6s;border:1px solid #28a745;}
.yxw-wz-xiugai li a:hover{background:#000;opacity:0.8;border:1px solid #000;}
select{outline:0;}
.baocun-ke-fh:hover{background:#333 !important;}
.sel-vip li{overflow:hidden;width:52px;height:32px;line-height:32px;background:#f3f5f7;border:1px solid #f3f5f7;cursor:pointer;;display:inline-block;text-align:center;margin-right:5px;border-radius:3px;}
.sel-vip li.on{border-color:#f30;color:#f30;background:#ffe5df;}
.sel-vip li:hover{border-color:#f30;color:#f30;background:#ffe5df;}
#source{display:none;}
.option3{display:none;}
.coolbg5{display:none;}
.mysource,.mywriter{z-index:10001;top:275px !important;left:108px !important;}
.wsselect a{margin-top:5px;display:inline-block;}
input#spmm{width:234px !important;}

/*文件上传*/
.progress{width:100% !important;margin-bottom:0 !important;}
.xuanzequ{width:100% !important;}
#uploadFileUP{padding:0;cursor:pointer;border:1px solid #28a745;border-radius:3px;}
#uploadFileUP b span{color:#51acf9;}
#ossfile1_up .progress-jd{padding:10px 15px;}
#upFile{display:block;line-height:42px;padding:0 51px;color:#28a745;}
</style>
</head>
<body>


<div class="yxw-wz-xiugai" style="width:98%;margin:0 auto;height:50px;line-height:50px;">
<ul style="overflow:hidden;padding:0 5px;">
<?php
if ($channelid == 17) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<li style="float:left;font-size:16px;color:#51acf9;font-weight:700;border-bottom:solid 3px #000;">发布章节</li>
<?php
} 
?>
<?php
if ($channelid == 1) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<li style="float:left;font-size:16px;color:#51acf9;font-weight:700;border-bottom:solid 3px #000;">发布文章</li>
<?php
} 
?>
<li style="float:right;"><?php echo $backurl;?></li>
</ul>
</div>
  

<form name="form1" action="article_add.php" enctype="multipart/form-data" method="post" onSubmit="return checkSubmit()">
<input type="hidden" name="channelid" value="<?php echo $channelid?>" />
<input type="hidden" name="dopost" value="save" />
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="2" id="needset" style="padding-top:20px;">
<tr>
<td height="24" colspan="5" class="bline">
<table width="900" border="0" cellspacing="0" cellpadding="0">
<tr>
<?php
if ($channelid == 17) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<td width="90">&nbsp;章节标题：</td>
<?php
} 
?>
<?php
if ($channelid == 1) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<td width="90">&nbsp;文章标题：</td>
<?php
} 
?>
<td width='810'><input name="title" type="text" id="title" autocomplete="off" value="<?php echo $title; ?>" placeholder="30字以内" maxlength="50" style="width:500px;"></td>
</tr>
</table>
</td>
</tr>



<?php
if ($channelid == 17) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<tr>
<td height="24" colspan="5" class="bline">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90">&nbsp;章节时长：</td>
<td><input name="shorttitle" type="text" id="shorttitle" style="width:234px;" autocomplete="off" placeholder="自动获取" maxlength="12" /></td>
</tr>
</table>
</td>
</tr>
<?php
} 
?>





<?php
if ($channelid == 1) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<tr>
<td height="24" colspan="5" class="bline">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td  width="90">&nbsp;自定属性：</td>
<td align="left">
<?php
$dsql->SetQuery("Select * From `#@__arcatt` order by sortid asc");
$dsql->Execute();
while($trow = $dsql->GetObject())
{
if($trow->att=='j')
echo "<input class='np' type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}' onclick='ShowUrlTr()'>{$trow->attname}[{$trow->att}]";
else
echo "<input class='np' type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}'>{$trow->attname}[{$trow->att}]";
}
?>
</td>
</tr>
</table>
</td>
</tr>
<?php
}
?>

<tr style="display:none">
<td height="24" colspan="5" class="bline" id="redirecturltr">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90">&nbsp;跳转网址：</td>
<td><input name="redirecturl" type="text" id="redirecturl" style="width:300px" value="" /></td>
</tr>
</table>
</td>
</tr>


<?php
if ($channelid == 1) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<tr id="pictable">
<td height="26" colspan="5" class="bline">
<table width="620" cellspacing="0" cellpadding="0">
<tr>
<td width="90">&nbsp;封面图片：</td>
<td>
<input name="picname" type="text" id="picname" style="width:300px">
<span class="btn btn-success btn-sm fileinput-button">上传图片<input type="file" name="files[]" id="iptAddImages"></span>
</td>
<td width="150" align="center"><img id="litPic" src="../static/web/img/defaultpic.jpg" style="max-width:150px;max-height:100px"></td>
</tr>
</table>
</td>
</tr>
<?php
} 
?>



<?php
if ($channelid == 17) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<tr>
<td height="24" colspan="5" class="bline" style="padding-top:10px;">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<td width="90" class="bline">&nbsp;章节类型：</td>
<td width="310">
<input name="source" type="text" id="source" style="width:160px" value="shipin" class="paytypeinp">
<div class="sel-vip">
<ul class="clearfix jjpaytype">
<li class="fl on" val="shipin">视频</li>
<li class="fl" val="yinpin">音频</li>
<li class="fl" val="tuwen">图文</li>
<li class="fl" val="wangpan">网盘</li>
</ul>
</div>
</td>
</table>
</td>
</tr>
<?php
} 
?>




<?php
if ($channelid == 1) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<tr>
<td height="24" colspan="5" class="bline" style="padding-top:10px;">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<td width="90" class="bline">&nbsp;原创标签：</td>
<td width="310">
<input name="source" type="text" id="source" style="width:160px" value="first-no" class="paytypeinp">
<div class="sel-vip">
<ul class="clearfix jjpaytype">
<li class="fl on" val="first-no" style="width:84px;">默认</li>
<li class="fl" val="first" style="width:84px;">原创</li>
</ul>
</div>
</td>
</table>
</td>
</tr>
<?php
} 
?>





<?php
if ($channelid == 1) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<tr>
<td height="24" colspan="5" class="bline">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<td width="90">&nbsp;文章作者：</td>
<td width="310">
<input name="writer" type="text" id="writer" style="width:160px" value="<?php echo $writer; ?>"/>
<input name="selwriter" type="button" id="selwriter" value="选择" style="width:70px"/>
</td>
</table>
</td>
</tr>
<?php
} 
?>




<tr>
<td height="24" colspan="5" class="bline">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<?php
if ($channelid == 17) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<td width="90">&nbsp;隶属课程：</td>
<?php
} 
?>
<?php
if ($channelid == 1) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<td width="90">&nbsp;隶属专栏：</td>
<?php
} 
?>
<td>
<span id='typeidct'>
<?php
$typeOptions = GetOptionList($cid,$cuserLogin->getUserChannel(),$channelid);
echo "<select name='typeid' id='typeid' style='width:236px;height:34px;line-height:34px;cursor:not-allowed;background:#f3f5f7;border:1px solid #f3f5f7;color:#c0c4cc;'>\r\n";
echo $typeOptions;
echo "</select>";
?>
</span>
<img src='images//menusearch.gif' style='cursor:pointer;display:none' onClick="ShowCatMap(event, this, <?php echo $channelid; ?>, 'typeid')" alt='快捷选择' title='快捷选择' />
&nbsp;
<?php
if($cfg_need_typeid2=='Y')
{
echo "<a href='javascript:AddTypeid2();' style='display:none'>【<u>选择副栏目</u>】</a>";
}
?>
<?php 
if($cfg_remote_site=='Y')
{
?> 　 
<input name="isremote" type="checkbox" id="isremote" value="1" <?php if($cfg_title_site=='Y') echo "checked";?>>是否同步远程发布  <?php GetFtp();?>     <?php
}
?>
</td>
</tr>
</table>
</td>
</tr>

<tr id='typeid2tr' style='display:none'>
<td height="24" colspan="5" class="bline">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90">&nbsp;文章副栏目：</td>
<td>
<span id='typeid2ct'></span><input type='text' name='typeid2' id='typeid2' value='' style='width:200px;' />
<img src='images/menusearch2.gif' style='cursor:pointer;' onClick="ShowCatMap(event, this, <?php echo $channelid; ?>, 'typeid2')" alt='选择副栏目' title='选择副栏目' />
</td>
</tr>
</table>
</td>
</tr>



<?php
if ($channelid == 17) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<tr>
<td height="24" colspan="4" class="bline">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90">&nbsp;浏览权限：</td>
<td width="710">
<select name="arcrank" id="arcrank" style="width:236px;height:34px;line-height:34px;">
<option value='500'>SVIP会员</option>
<option value='0'>开放浏览</option>
</select>
</td>
<input name="money" type="text" id="money" value="0" size="10" style='width:155px;display:none;'/>
</tr>
</table>
</td>
</tr>
<?php
} 
?>









<?php
if ($channelid == 1) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<tr>
<td height="24" colspan="5" class="bline">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90">&nbsp;相关文章：</td>
<td width="710"><input type='text' name="keywords" id="keywords" placeholder="写一个[关联词]" style="width:235px" value="<?php echo $keywords; ?>" /></td>
</tr>
</table>
</td>
</tr>
<?php
} 
?>






<?php
if ($channelid == 1) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<tr>
<td height="24" colspan="5" class="bline">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90">&nbsp;内容摘要：</td>
<td><textarea name="description" rows="5" id="description" placeholder="默认自动从内容详情中获取，无需手动填写..." style="width:100%;height:50px;padding:10px 10px;line-height:20px;"><?php echo $description; ?></textarea></td>
</tr>
</table>
</td>
</tr>
<?php
} 
?>

<tr><td colspan="2" style="padding:0;"><?php PrintAutoFieldsAdd($cInfos['fieldset'],'autofield'); ?></td></tr>


<!-- 上传音视频文件 -->
<?php
if ($channelid == 17) { //如果模型ID是18 
?>
<tr>
<td colspan="2">
<table style="width:100%;">
<tr>
<td width="85" class="bline" height="24"></td>
<td class="bline">
<!-- 上传文件开始 -->
<div class="xuanzequ" id="upload-containerUP">
<button id="uploadFileUP" type="button">
<span id="upFile">把文件上传到服务器</span>
<div id="ossfile1_up"></div>
<div id="console_up"></div>
</button>
</div>
<link rel="stylesheet" type="text/css" href="jjup/style.css"/>
<script type="text/javascript" src="jjup/lib/plupload-2.1.2/js/plupload.full.min.js"></script>
<script type="text/javascript" src="jjup/upFile.js"></script>
<!-- 上传文件结束 --> 
</td>
</tr>
</table>
</td>
</tr>
<?php
}
?>
<!-- 上传音视频文件 End -->


<tr>
<td height="28" colspan="2" bgcolor="#fff" class="bline2" style="border-bottom:0;">
<?php
if ($channelid == 17) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<div style='float:left;line-height:28px;'>&nbsp;<strong>图文内容：</strong></div>
<?php
} 
?>
<?php
if ($channelid == 1) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<div style='float:left;line-height:28px;'>&nbsp;<strong>内容详情：</strong></div>
<?php
} 
?>
</td>
</tr>



<tr style="display:none;">
<td width="100%" height="24" colspan="2" class="bline">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90">&nbsp;附加选项：</td>
<td>
<input name="remote" type="checkbox" class="np" id="remote" value="1"<?php if($cfg_rm_remote=='Y') echo ' checked="1" '; ?> />下载远程图片和资源
<input name="dellink" type="checkbox" class="np" id="dellink" value="1"<?php if($cfg_arc_dellink=='N') echo ' checked="1" '; ?> />删除非站内链接 <a href="javascript:OpenMyWin('article_allowurl_edit.php');">[设置]</a>
<input name="autolitpic" type="checkbox" class="np" id="autolitpic" value="1"<?php if($cfg_arc_autopic=='Y') echo ' checked="1" '; ?> checked="1" />提取第一个图片为缩略图
</td>
</tr>
</table>
</td>
</tr>






<tr style="display:none;">
<td width="100%" height="24" colspan="2" class="bline">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90">&nbsp;分页方式：</td>
<td>
<input name="sptype" type="radio" class="np" value="hand"<?php if($cfg_arcautosp=='N') echo " checked='1' "?>/>手动
<input type="radio" name="sptype" value="auto" class="np"<?php if($cfg_arcautosp=='Y') echo " checked='1' "?>/>自动　大小：
<input name="spsize" type="text" id="spsize" value="<?php echo $cfg_arcautosp_size?>" size="6" /> K
(分页符为： <font color="#FF0000">#p#分页标题#e# </font>)
</td>
</tr>
</table>
</td>
</tr>




<!-- 内容编辑器 -->
<tr>
<td width="100%" id="arcBody">
<?php GetEditor("body",$body,450); ?>
</td>
<td width="260" align="center" bgcolor="#FFFFCC" id="mPic" style="display:none"></td>
</tr>
<!-- 内容编辑器 End -->



<!-- 高级参数 -->
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="2" id="adset" style="padding:20px 0;">
<tr>
<td height="24" colspan="4" class="bline">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<div class="yxw-pl-yc" style="display:none;">
<input type='radio' name='notpost' class='np' value='0' <?php if($cfg_feedback_forbid=='N') echo "checked='1' "; ?> />
<input type='radio' name='notpost' class='np' value='1' <?php if($cfg_feedback_forbid=='Y') echo "checked='1' "; ?> />
</div>
<?php
if ($channelid == 17) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<td width="90">学习次数：</td>
<?php
} 
?>
<?php
if ($channelid == 1) { //这里写内容模型ID，写进去的模型为隐藏//
?>
<td width="90">浏览次数：</td>
<?php
} 
?>
<td>
<input type='text' name='click' value='<?php echo ($cfg_arc_click=='-1' ? mt_rand(100, 1000) : $cfg_arc_click); ?>' style='width:160px;' />
</td>
</tr>
</table>
</td>
</tr>




<tr style="display:none;">
<td height="24" colspan="4" class="bline">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90" height="22">&nbsp;文章排序：</td>
<td width="240">
<select name="sortup" id="sortup" style="width:150px">
<option value="0" selected>默认排序</option>
<option value="7">置顶一周</option>
<option value="30">置顶一个月</option>
<option value="90">置顶三个月</option>
<option value="180">置顶半年</option>
<option value="360">置顶一年</option>
</select> </td>
<td width="90">标题颜色：</td>
<td>
<input name="color" type="text" id="color" style="width:120px"/>
<input name="modcolor" type="button" id="modcolor" value="选取" onClick="ShowColor(event,this)" />
</td>
</tr>
</table>
</td>
</tr>





<tr style="display:none;">
<td height="26" colspan="4" class="bline">
<table width="350" cellspacing="0" cellpadding="0">
<tr>
<td width="90">发布时间：</td>
<td width="260">
<?php
$nowtime = GetDateTimeMk(time());
echo "<input type='text' name='pubdate' value='$nowtime' id='pubdate' class='datepicker' style='width:160px'>";
?>
</td>
</tr>
</table>
</td>
</tr>





<tr style="display:none;">
<td height="24" colspan="4">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="88">&nbsp;html名称：</td>
<td width="351"><input type="text" name="filename" id="filename" style="width:140px;" /></td>
<td width="340">
<?php
if(isset($cfg_tamplate_rand) && $cfg_tamplate_rand==1)
{
?>
随机选择模板：
<select name='templet' id='templet' style='width:200px' size='1'>
<?php
$rndsel = mt_rand(1, count($cfg_tamplate_arr)) - 1;
foreach($cfg_tamplate_arr as $k=>$v)
{
$v = trim($v);
echo ($k==$rndsel ? "<option value='$v' selected>$v</option>\r\n" : "<option value='$v'>$v</option>\r\n");
}
?>
</select>
<?php
}
else{
echo "<input type='hidden' name='templet' value='' />";
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>


<div class="yxw-gl" style="height:65px;width:97%;margin:0 15px;"></div>
<div class="yxw-wzfb" style="width:97%;background:#fff;height:73px;position:fixed;overflow:hidden;bottom:0;margin:0 15px;">
<input name="imageField" type="submit" value="保存发布" class="baocun-ke-fh" style="cursor:pointer;position:absolute;bottom:15px;left:50%;margin-left:-80px;border-radius:3px;padding:0 20px;border:none;line-height:38px;font-size:16px;"/>
</div>

</form>
<div id="__tmpbody" style="display:none"></div>
<script>InitPage();</script>

<script>
$(".jjpaytype li").click(function(){
var aid = $(this).attr("val");  
$(".paytypeinp").val(aid);
$(".jjpaytype li").removeClass("on");
$(this).addClass("on");
})
</script>

</body>
</html>